import React, {Component} from "react";
import {
	View,
	Text,
	TouchableOpacity,
} from "react-native";

export default class NavIndex extends Component {
	static navigationOptions = {
		title: "首页",
	}
	constructor(props) {
		super(props)
	}
	render() {
		const {navigate, setParams} = this.props.navigation;
		return (
			<View>
				<Text>这是首页</Text>
				<TouchableOpacity onPress={() => { navigate("NavOne", {user: "fangming"}) }}>
					<Text>跳转到One页面</Text>
				</TouchableOpacity>
				<TouchableOpacity onPress={() => {
							navigate("NavTwo", {user: "zhangsan"});
						}
					}
				>
					<Text>跳转到Two页面</Text>
				</TouchableOpacity>
				<TouchableOpacity onPress={() => {
							navigate("TabView");
						}
					}
				>
					<Text>跳转到Tab1页面</Text>
				</TouchableOpacity>
				<TouchableOpacity onPress={() => {
							navigate("CustomTab");
						}
					}
				>
					<Text>跳转到自定义的导航页面</Text>
				</TouchableOpacity>
				<TouchableOpacity onPress={() => navigate("CustomTransitioner")}>
					<Text>跳转到CustomTransitioner页面</Text>					
				</TouchableOpacity>
			</View>
		);
	}
}